// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   ClientAppLoader.java

package com.boci.clientapp.main;

import com.boci.clientapp.authentication.LoginPanel;
import com.boci.common.constant.ClientAppConst;
import com.boci.common.util.AppConfigurator;
import com.boci.common.util.MessagesConfigurator;
import java.awt.*;
import java.io.*;
import java.net.URL;
import java.net.URLDecoder;
import java.security.*;
import java.util.Locale;
import java.util.Properties;
import javax.swing.*;

// Referenced classes of package com.boci.clientapp.main:
//            TradingClientApp, InvisibleFrame, ApplicationService, MainPanel

public class ClientAppLoader
{

    public ClientAppLoader()
    {
    }

    private static native int getHWnd(String s);

    private static native boolean setOnTop(int i, boolean flag, boolean flag1);

    private static native boolean hideTaskBar(int i);

    private static native boolean setWinFocus(int i);

    public static boolean isStandalone()
    {
        return standalone_Flag;
    }

    public static boolean isFirstInstance(String className)
    {
        if(isWindowsPlatform())
            return getHWnd(className) == 0;
        else
            return true;
    }

    public static boolean isWindowsPlatform()
    {
        String strOSName = System.getProperty("os.name");
        if(strOSName != null && strOSName.length() > 3)
            return strOSName.substring(0, 3).equals("Win");
        else
            return false;
    }

    public static boolean setOnTop(String className, boolean styleBtnsFlag)
    {
        if(isWindowsPlatform())
        {
            int HWnd = getHWnd(className);
            return setOnTop(HWnd, true, styleBtnsFlag);
        } else
        {
            return true;
        }
    }

    public static void loadLibrary()
        throws Exception
    {
        String tmpFilePath;
        //if(!isWindowsPlatform())
        //{
	        tmpFilePath = "";
	        InputStream is;
	        File temp;
	        is = com.boci.clientapp.main.ClientAppLoader.class.getResourceAsStream("/com/boci/common/resources/library/clientapp.dll");
	        temp = new File((new StringBuilder()).append(getSysTmp()).append("/clientapp.dll.tmp").toString());
	        tmpFilePath = temp.getAbsolutePath();
	        if(temp.exists() && !temp.delete())
	        {
	            System.load(tmpFilePath);
	            return;
	        }
	        try
	        {
	            FileOutputStream fos = new FileOutputStream(temp.getAbsoluteFile());
	            byte buf[] = new byte[1024];
	            int len;
	            while((len = is.read(buf)) > 0) 
	                fos.write(buf, 0, len);
	            is.close();
	            fos.close();
	            temp.deleteOnExit();
	        }
	        catch(IOException e)
	        {
	            e.printStackTrace();
	        }
	        //System.load(tmpFilePath);
        //}
    }

    public static String getStrChiFont()
    {
        return strChiFont;
    }

    public static String getStrEngFont()
    {
        return strEngFont;
    }

    public static String getStrSChiFont()
    {
        return strSChiFont;
    }

    public static MessagesConfigurator getMessagesConfigurator()
    {
        return msgConfigurator;
    }

    public static AppConfigurator getAppConfigurator()
    {
        return appConfigurator;
    }

    public static String[] getHistory_TimePeriods()
    {
        return strTimePeriods;
    }

    public static String[] getHistory_Transactions()
    {
        return strTransactions;
    }

    public static String[] getPrefer_Languages()
    {
        return strPreferLangs;
    }

    public static String[] getHKMktOrdTypes()
    {
        return strHKMkt_OrdTypes;
    }

    public static String[] getUSMktOrdTypes()
    {
        return strUSMkt_OrdTypes;
    }

    public static String[] getHKOptOrdTypes()
    {
        return strHKOpt_OrdTypes;
    }

    public static String[] getNoPriceOrdTypes()
    {
        return strNoPrice_OrdTypes;
    }

    public static String[] getUSOptOrdTypes()
    {
        return strUSOpt_OrdTypes;
    }

    public static int getDefaultOrdTypeIndex(String pMarket)
    {
        if(pMarket.equals("HK_MARKET"))
            return intDefHKMkt_OrdTypeIdx;
        if(pMarket.equals("US_MARKET"))
            return intDefUSMkt_OrdTypeIdx;
        if(pMarket.equals("HK_OPTION"))
            return intDefHKOpt_OrdTypeIdx;
        if(pMarket.equals("US_OPTION"))
            return intDefUSOpt_OrdTypeIdx;
        else
            return 0;
    }

    public static boolean enablePKI()
    {
        return enablePKI_Flag;
    }

    public static boolean pki4AllMsg()
    {
        return pki4AllMsg_Flag;
    }

    public static boolean allowGetQuote()
    {
        return getQuote_Flag;
    }

    public static boolean enablePreferLang()
    {
        return enablePreferLang_Flag;
    }

    public static void startup(boolean pStandaloneFlag, JApplet pApplet)
    {
        try
        {
            if(pStandaloneFlag)
            {
                String className = "com.boci.clientapp.main.TradingClientApp";
                String restoreFrameName = "com.boci.clientapp.main.RestoreFrame";
                String invisibleFrameName = "com.boci.clientapp.main.InvisibleFrame";
                loadLibrary();
                if(isFirstInstance(className) && isFirstInstance(restoreFrameName) && isFirstInstance(invisibleFrameName))
                {
                    InvisibleFrame.open();
                } else
                {
                    if(isFirstInstance(invisibleFrameName))
                    {
                        InvisibleFrame.open();
                        int hwnd = getHWnd(invisibleFrameName);
                        hideTaskBar(hwnd);
                        setOnTop(getHWnd(invisibleFrameName), true, true);
                        UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
                        setOptionPaneText(ClientAppConst.ZH_HK);
                        msgConfigurator = MessagesConfigurator.getInstance();
                        String strTitle = msgConfigurator.getErrorMessage("COMMON.DIALOG_TITLE", ClientAppConst.EN_US);
                        String strMsg = (new StringBuilder()).append(msgConfigurator.getErrorMessage("COMMON.ALREADY_OPENED", ClientAppConst.EN_US)).append("\n").append(msgConfigurator.getErrorMessage("COMMON.ALREADY_OPENED", ClientAppConst.ZH_HK)).append("\n").append(msgConfigurator.getErrorMessage("COMMON.ALREADY_OPENED", ClientAppConst.ZH_CN)).toString();
                        String strOK = msgConfigurator.getUIMessages("COMMON.OK", ClientAppConst.EN_US);
                        Object options[] = {
                            strOK
                        };
                        InvisibleFrame.getFrame().setIconImage(getIconImage());
                        InvisibleFrame.getFrame().setTitle(strTitle);
                        JOptionPane.showOptionDialog(InvisibleFrame.getFrame(), strMsg, strTitle, -1, 2, null, options, options[0]);
                    }
                    setWinFocus(getHWnd(invisibleFrameName));
                    System.exit(0);
                }
            }
            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
            standalone_Flag = pStandaloneFlag;
            appConfigurator = AppConfigurator.getInstance();
            Toolkit.getDefaultToolkit().setDynamicLayout(true);
            Locale defaultLocale = ClientAppConst.ZH_CN;
            String strLoginLang = appConfigurator.getAppConfig("LOGIN_LANG");
            if(strLoginLang != null)
                if(strLoginLang.equals("en_US"))
                    defaultLocale = ClientAppConst.EN_US;
                else
                if(strLoginLang.equals("zh_HK"))
                    defaultLocale = ClientAppConst.ZH_HK;
                else
                if(strLoginLang.equals("zh_CN"))
                    defaultLocale = ClientAppConst.ZH_CN;
            setOptionPaneText(defaultLocale);
            String strTrustStorePath = null;
            if(appConfigurator.getBoolean("USE_TRUSTSTORE"))
            {
                strTrustStorePath = (new StringBuilder()).append(getRootPath()).append(System.getProperty("file.separator")).append(appConfigurator.getAppConfig("TRUSTSTORE_PATH")).toString();
                System.setProperty("javax.net.ssl.trustStore", strTrustStorePath);
            }
            enablePKI_Flag = appConfigurator.getBoolean("ENABLE_PKI");
            pki4AllMsg_Flag = appConfigurator.getBoolean("PKI_FOR_ALL_MESSAGES");
            getQuote_Flag = appConfigurator.getBoolean("GET_QUOTE");
            enablePreferLang_Flag = appConfigurator.getBoolean("ENABLE_PREFER_LANG");
            strHKMkt_OrdTypes = appConfigurator.getStrings("HK_MARKET_ORDERTYPE");
            strUSMkt_OrdTypes = appConfigurator.getStrings("US_MARKET_ORDERTYPE");
            strHKOpt_OrdTypes = appConfigurator.getStrings("HK_OPTION_ORDERTYPE");
            strUSOpt_OrdTypes = appConfigurator.getStrings("US_OPTION_ORDERTYPE");
            intDefHKMkt_OrdTypeIdx = appConfigurator.getInt("DEF_HK_MARKET_ORDERTYPE_INDEX", 0);
            if(intDefHKMkt_OrdTypeIdx >= strHKMkt_OrdTypes.length)
                intDefHKMkt_OrdTypeIdx = 0;
            intDefUSMkt_OrdTypeIdx = appConfigurator.getInt("DEF_US_MARKET_ORDERTYPE_INDEX", 0);
            if(intDefUSMkt_OrdTypeIdx >= strUSMkt_OrdTypes.length)
                intDefUSMkt_OrdTypeIdx = 0;
            intDefHKOpt_OrdTypeIdx = appConfigurator.getInt("DEF_HK_OPTION_ORDERTYPE_INDEX", 0);
            if(intDefHKOpt_OrdTypeIdx >= strHKOpt_OrdTypes.length)
                intDefHKOpt_OrdTypeIdx = 0;
            intDefUSOpt_OrdTypeIdx = appConfigurator.getInt("DEF_US_OPTION_ORDERTYPE_INDEX", 0);
            if(intDefUSOpt_OrdTypeIdx >= strUSOpt_OrdTypes.length)
                intDefUSOpt_OrdTypeIdx = 0;
            strNoPrice_OrdTypes = appConfigurator.getStrings("NO_PRICE_ORDERTYPE");
            strTransactions = appConfigurator.getStrings("HISTORY_TRANSACTIONS");
            strPreferLangs = appConfigurator.getStrings("PREFER_LANG");
            strTimePeriods = appConfigurator.getStrings("HISTORY_TIME_PERIODS");
            strCertSubject = appConfigurator.getAppConfig("SERVER_CERT_SUBJECT");
            strCertIssuer = appConfigurator.getAppConfig("SERVER_CERT_ISSUER");
            serverCertCheckingFlag = appConfigurator.getBoolean("SERVER_CERT_CHECKING");
            intHKDecimalLimit = appConfigurator.getInt("HK_DECIMAL_LIMIT", 3);
            intUSDecimalLimit = appConfigurator.getInt("US_DECIMAL_LIMIT", 2);
            msgConfigurator = MessagesConfigurator.getInstance();
            if(pStandaloneFlag)
            {
                TradingClientApp mainFrame = new TradingClientApp(defaultLocale);
                ApplicationService appServ = ApplicationService.createInstance(mainFrame, mainFrame.getContentPane(), defaultLocale);
                mainFrame.showMainFrame(true);
                appServ.getMainPanel().getLoginPanel().refresh();
                InvisibleFrame.close();
                String strProxyEnabled = appConfigurator.getProxyConfig("PROXY_ENABLED");
                if(strProxyEnabled != null && strProxyEnabled.equals("Y"))
                {
                    System.getProperties().put("https.proxySet", "true");
                    System.getProperties().put("https.proxyPort", appConfigurator.getProxyConfig("PROXY_PORT"));
                    System.getProperties().put("https.proxyHost", appConfigurator.getProxyConfig("PROXY_HOST"));
                    System.getProperties().put("https.proxyUser", appConfigurator.getProxyConfig("PROXY_USER"));
                    System.getProperties().put("https.proxyPassword", appConfigurator.getProxyConfig("PROXY_PASSWORD"));
                }
            } else
            {
                ApplicationService appServ = ApplicationService.createInstance(pApplet, pApplet.getContentPane(), defaultLocale);
                appServ.getMainPanel().getLoginPanel().refresh();
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

    public static String getTempPath()
        throws Exception
    {
        String tmpPath = "";
        if(AppConfigurator.getAppConfigProperties() != null)
            tmpPath = AppConfigurator.getAppConfigProperties().getProperty("APP_TEMP_PATH");
        else
            tmpPath = getSysTmp();
        if(tmpPath == null)
            return getSysTmp();
        if(tmpPath.startsWith("%HOME%"))
        {
            tmpPath = tmpPath.replaceFirst("%HOME%", "");
            tmpPath = (new StringBuilder()).append(getUserHome()).append(tmpPath).toString();
        } else
        if(tmpPath.startsWith("%TEMP%"))
        {
            tmpPath = tmpPath.replaceFirst("%TEMP%", "");
            tmpPath = (new StringBuilder()).append(getSysTmp()).append(tmpPath).toString();
        } else
        if(tmpPath.startsWith("%APP%"))
        {
            tmpPath = tmpPath.replaceFirst("%APP%", "");
            tmpPath = (new StringBuilder()).append(getAppPath()).append(tmpPath).toString();
        }
        File tmpFolder = new File(tmpPath);
        if(!tmpFolder.exists())
            tmpFolder.mkdirs();
        return tmpPath;
    }

    public static String getUserHome()
    {
        if(isStandalone())
        {
            return System.getProperty("user.home");
        } else
        {
            String strUsrHome = (String)AccessController.doPrivileged(new PrivilegedAction() {

                public Object run()
                {
                    return System.getProperty("user.home");
                }

            }
);
            return strUsrHome;
        }
    }

    public static String getSysTmp()
    {
        if(isStandalone())
        {
            return System.getProperty("java.io.tmpdir");
        } else
        {
            String strUsrHome = (String)AccessController.doPrivileged(new PrivilegedAction() {

                public Object run()
                {
                    return System.getProperty("java.io.tmpdir");
                }

            }
);
            return strUsrHome;
        }
    }

    public static String getAppPath()
    {
        String strAppPath = "";
        String strName = "/com/boci/clientapp/main/ClientAppLoader.class";
        String strPath = com.boci.clientapp.main.ClientAppLoader.class.getResource(strName).getFile();
        int idx1 = strPath.indexOf("!");
        if(idx1 == -1)
        {
            strAppPath = strPath.substring(0, strPath.length() - strName.length());
        } else
        {
            strAppPath = strPath.substring(0, idx1);
            File f = new File(strAppPath);
            strAppPath = f.getParent();
            if(strAppPath.substring(0, 5).equals("file:"))
                strAppPath = strAppPath.replaceFirst("file:", "");
        }
        strAppPath = strAppPath.replaceAll("%20", " ");
        return strAppPath;
    }

    private static Image getImage(URL pIconURL)
    {
        Toolkit defaultToolkit = Toolkit.getDefaultToolkit();
        Image iconImage = null;
        try
        {
            iconImage = defaultToolkit.getImage(pIconURL);
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return iconImage;
    }

    public static Image getIconImage()
    {
        String strIconURL = "/com/boci/common/resources/image/boci.gif";
        URL iconURL = com.boci.clientapp.main.ClientAppLoader.class.getResource(strIconURL);
        return getImage(iconURL);
    }

    public static Icon getIcon()
    {
        return new ImageIcon(getIconImage());
    }

    public static Icon getTabIcon()
    {
        String strIconURL = "/com/boci/common/resources/image/line.JPG";
        URL iconURL = com.boci.clientapp.main.ClientAppLoader.class.getResource(strIconURL);
        return new ImageIcon(getImage(iconURL));
    }

    public static Icon getLogo()
    {
        String strLogoURL = "/com/boci/common/resources/image/boci_logo.jpg";
        URL logoURL = com.boci.clientapp.main.ClientAppLoader.class.getResource(strLogoURL);
        return new ImageIcon(getImage(logoURL));
    }

    public static Font getLargeBoldTextFont(Locale pLocale)
    {
        Font boldPlainTextFont;
        if(pLocale.equals(ClientAppConst.ZH_CN))
            boldPlainTextFont = sChiLargeBoldPlainTextFont;
        else
        if(pLocale.equals(ClientAppConst.ZH_HK))
            boldPlainTextFont = tChiLargeBoldPlainTextFont;
        else
            boldPlainTextFont = engLargeBoldPlainTextFont;
        return boldPlainTextFont;
    }

    public static Font getLargePlainTextFont(Locale pLocale)
    {
        Font largePlainTextFont;
        if(pLocale.equals(ClientAppConst.ZH_CN))
            largePlainTextFont = sChiLargePlainTextFont;
        else
        if(pLocale.equals(ClientAppConst.ZH_HK))
            largePlainTextFont = tChiLargePlainTextFont;
        else
            largePlainTextFont = engLargePlainTextFont;
        return largePlainTextFont;
    }

    public static Font getSmallBoldTextFont(Locale pLocale)
    {
        Font smallBoldTextFont;
        if(pLocale.equals(ClientAppConst.ZH_CN))
            smallBoldTextFont = sChiSmallBoldTextFont;
        else
        if(pLocale.equals(ClientAppConst.ZH_HK))
            smallBoldTextFont = tChiSmallBoldTextFont;
        else
            smallBoldTextFont = engSmallBoldTextFont;
        return smallBoldTextFont;
    }

    public static Font getSmallPlainTextFont(Locale pLocale)
    {
        Font smallPlainTextFont;
        if(pLocale.equals(ClientAppConst.ZH_CN))
            smallPlainTextFont = sChiSmallPlainTextFont;
        else
        if(pLocale.equals(ClientAppConst.ZH_HK))
            smallPlainTextFont = tChiSmallPlainTextFont;
        else
            smallPlainTextFont = engSmallPlainTextFont;
        return smallPlainTextFont;
    }

    public static Font getPlainButtonFont(Locale pLocale)
    {
        Font plainButtonFont;
        if(pLocale.equals(ClientAppConst.ZH_CN))
            plainButtonFont = sChiPlainButtonFont;
        else
        if(pLocale.equals(ClientAppConst.ZH_HK))
            plainButtonFont = tChiPlainButtonFont;
        else
            plainButtonFont = engPlainButtonFont;
        return plainButtonFont;
    }

    public static Font getBoldButtonFont(Locale pLocale)
    {
        Font boldButtonFont;
        if(pLocale.equals(ClientAppConst.ZH_CN))
            boldButtonFont = sChiBoldButtonFont;
        else
        if(pLocale.equals(ClientAppConst.ZH_HK))
            boldButtonFont = tChiBoldButtonFont;
        else
            boldButtonFont = engBoldButtonFont;
        return boldButtonFont;
    }

    public static Font getDisclaimerFont(Locale pLocale)
    {
        Font disclaimerFont;
        if(pLocale.equals(ClientAppConst.ZH_CN))
            disclaimerFont = sChiDisclaimerFont;
        else
        if(pLocale.equals(ClientAppConst.ZH_HK))
            disclaimerFont = tChiDisclaimerFont;
        else
            disclaimerFont = engDisclaimerFont;
        return disclaimerFont;
    }

    public static Font getSymbolFont()
    {
        return symbolFont;
    }

    public static void setOptionPaneText(Locale pLocale)
    {
        Font font = null;
        if(pLocale.equals(ClientAppConst.ZH_HK))
            font = new Font(getStrChiFont(), 0, 12);
        else
        if(pLocale.equals(ClientAppConst.ZH_CN))
            font = new Font(getStrSChiFont(), 0, 12);
        else
        if(pLocale.equals(ClientAppConst.EN_US))
            font = new Font(getStrEngFont(), 0, 11);
        UIManager.put("OptionPane.font", font);
        UIManager.put("OptionPane.messageFont", font);
        UIManager.put("OptionPane.buttonFont", font);
        UIManager.put("ToolTip.font", font);
    }

    public static String getStrCertIssuer()
    {
        return strCertIssuer;
    }

    public static String getStrCertSubject()
    {
        return strCertSubject;
    }

    public static boolean isServerCertCheckingFlag()
    {
        return serverCertCheckingFlag;
    }

    public static int getHKDecimalLimit()
    {
        return intHKDecimalLimit;
    }

    public static int getUSDecimalLimit()
    {
        return intUSDecimalLimit;
    }

    public static String getRootPath()
    {
        String rootPath;
        try
        {
            rootPath = URLDecoder.decode(com.boci.clientapp.main.ClientAppLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8");
            String osName = System.getProperty("os.name");
            if(osName.toUpperCase().contains("WINDOWS"))
                rootPath = rootPath.substring(1);
            rootPath = (new File(rootPath)).getParent();
        }
        catch(UnsupportedEncodingException e)
        {
            e.printStackTrace();
            rootPath = System.getProperty("user.dir");
        }
        return rootPath;
    }

    private static String strCertSubject;
    private static String strCertIssuer;
    private static boolean serverCertCheckingFlag;
    private static boolean standalone_Flag;
    private static boolean enablePKI_Flag;
    private static boolean pki4AllMsg_Flag;
    private static boolean getQuote_Flag;
    private static boolean enablePreferLang_Flag;
    private static String strHKMkt_OrdTypes[];
    private static String strUSMkt_OrdTypes[];
    private static String strHKOpt_OrdTypes[];
    private static String strUSOpt_OrdTypes[];
    private static int intDefHKMkt_OrdTypeIdx;
    private static int intDefUSMkt_OrdTypeIdx;
    private static int intDefHKOpt_OrdTypeIdx;
    private static int intDefUSOpt_OrdTypeIdx;
    private static String strNoPrice_OrdTypes[];
    private static String strTimePeriods[];
    private static String strTransactions[];
    private static String strPreferLangs[];
    private static AppConfigurator appConfigurator;
    private static MessagesConfigurator msgConfigurator;
    private static String strChiFont;
    private static String strSChiFont;
    private static String strEngFont;
    private static Font sChiDisclaimerFont;
    private static Font tChiDisclaimerFont;
    private static Font engDisclaimerFont;
    private static Font symbolFont = new Font("", 0, 12);
    private static Font sChiBoldButtonFont;
    private static Font tChiBoldButtonFont;
    private static Font engBoldButtonFont;
    private static Font sChiPlainButtonFont;
    private static Font tChiPlainButtonFont;
    private static Font engPlainButtonFont;
    private static Font sChiSmallPlainTextFont;
    private static Font tChiSmallPlainTextFont;
    private static Font engSmallPlainTextFont;
    private static Font sChiSmallBoldTextFont;
    private static Font tChiSmallBoldTextFont;
    private static Font engSmallBoldTextFont;
    private static Font sChiLargePlainTextFont;
    private static Font tChiLargePlainTextFont;
    private static Font engLargePlainTextFont;
    private static Font sChiLargeBoldPlainTextFont;
    private static Font tChiLargeBoldPlainTextFont;
    private static Font engLargeBoldPlainTextFont;
    private static int intHKDecimalLimit;
    private static int intUSDecimalLimit;
    public static final boolean performanceFlag = true;
    public static final boolean formatPriceFlag = false;
    public static final boolean formatQtyFlag = true;

    static 
    {
        strChiFont = "PMingLiU";
        strSChiFont = "NSimSun";
        strEngFont = "Arial";
        sChiDisclaimerFont = new Font(strSChiFont, 0, 12);
        tChiDisclaimerFont = new Font(strChiFont, 0, 11);
        engDisclaimerFont = new Font(strEngFont, 0, 11);
        sChiBoldButtonFont = new Font(strSChiFont, 1, 12);
        tChiBoldButtonFont = new Font(strChiFont, 1, 12);
        engBoldButtonFont = new Font(strEngFont, 1, 12);
        sChiPlainButtonFont = new Font(strSChiFont, 0, 12);
        tChiPlainButtonFont = new Font(strChiFont, 0, 12);
        engPlainButtonFont = new Font(strEngFont, 0, 12);
        sChiSmallPlainTextFont = new Font(strSChiFont, 0, 12);
        tChiSmallPlainTextFont = new Font(strChiFont, 0, 12);
        engSmallPlainTextFont = new Font(strEngFont, 0, 12);
        sChiSmallBoldTextFont = new Font(strSChiFont, 0, 12);
        tChiSmallBoldTextFont = new Font(strChiFont, 0, 12);
        engSmallBoldTextFont = new Font(strEngFont, 1, 12);
        sChiLargePlainTextFont = new Font(strSChiFont, 0, 15);
        tChiLargePlainTextFont = new Font(strChiFont, 0, 15);
        engLargePlainTextFont = new Font(strEngFont, 0, 14);
        sChiLargeBoldPlainTextFont = new Font(strSChiFont, 0, 15);
        tChiLargeBoldPlainTextFont = new Font(strChiFont, 0, 15);
        engLargeBoldPlainTextFont = new Font(strEngFont, 1, 14);
    }
}
